package top.yaofengqiao.springcloudsimple.auth.biz.domain.user.service.impl;

import org.springframework.stereotype.Service;
import top.yaofengqiao.springcloudsimple.auth.biz.domain.auth.model.valobj.Oauth2Type;
import top.yaofengqiao.springcloudsimple.auth.biz.domain.user.model.entity.MemberEntity;
import top.yaofengqiao.springcloudsimple.auth.biz.domain.user.repository.IMemberRepository;
import top.yaofengqiao.springcloudsimple.auth.biz.domain.user.service.IMemberService;

import javax.annotation.Resource;

/**
 * @author yfq
 * @date 2024/6/6 15:36
 * @description
 */
@Service
public class MemberService implements IMemberService {
    @Resource
    private IMemberRepository memberRepository;

    @Override
    public MemberEntity queryByMobile(String mobile) {
        return memberRepository.queryByMobile(mobile);
    }

    @Override
    public MemberEntity queryById(long memberId) {
        return memberRepository.queryById(memberId);
    }

    @Override
    public MemberEntity queryByOpenid(String openid, Oauth2Type oauth2Type) {
        return memberRepository.queryByOpenid(openid, oauth2Type);
    }
}
